<template>
  <div class="mockOrderData-details-container">
    <div style="padding: 8px; background-color: #fff; height: 30%">
      <el-descriptions :column="2">
        <el-descriptions-item label="订单编号">
          <label>{{ props.data.Ordernumber }}</label></el-descriptions-item
        >
        <el-descriptions-item label="订单状态"
          ><label>{{ props.data.status }}</label></el-descriptions-item
        >
        <el-descriptions-item label="实付金额"
          ><label>{{ props.data.amount }}</label></el-descriptions-item
        >
        <el-descriptions-item label="创建时间"
          ><label>{{ props.data.Creationtime }}</label></el-descriptions-item
        >
        <el-descriptions-item label="支付时间"
          ><label>{{ props.data.Paymenttime }}</label></el-descriptions-item
        >
      </el-descriptions>
    </div>
    <div class="boang">
      <el-descriptions>
        <el-descriptions-item>
          <el-scrollbar>
            <div style="height: 250px">
              <el-table
                :data="props.data.detailslist"
                style="width: 700px; height: 100%"
                row-class-name="order-row"
              >
                <el-table-column fixed type="index" width="36" />
                <el-table-column fixed prop="Itemnumber" label="商品编号" width="270px" />
                <el-table-column fixed prop="name" label="商品名称" />
                <el-table-column prop="cpunt" label="数量" />
                <el-table-column prop="unitprice" label="单价" />
                <el-table-column prop="discount" label="折扣" />
                <el-table-column prop="dedcount" label="抵扣" />
                <el-table-column prop="creationtime" label="下单时间" width="200px" />
              </el-table>
            </div>
          </el-scrollbar>
        </el-descriptions-item>
      </el-descriptions>
    </div>
  </div>
</template>

<script setup>
import { defineProps } from "vue";

const props = defineProps({
  data: {
    type: Object,
    default: () => ({}),
    required: true,
  },
});
function ss() {
  console.log(props.data);
}
ss();
</script>

<style scoped>
.mockOrderData-details-container {
  padding: 16px;
  height: 460px;
  background-color: #f0f2f5;
}

.boang {
  padding: 16px;
  background-color: #fff;
  height: calc(70% - 16px);
  margin-top: 16px;
}
</style>
